Skip to content

Described runs: pixel-type and dimension checks per unit (#239, narrowed) - #243

Merged
guijacquemet merged 4 commits into
mainfrom
claude/described-unit-checks
Nov 9, 2026
Merged

guijacquemet merged 4 commits into
mainfrom
claude/described-unit-checks

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Fixes #239

Scope, narrowed by the owner on 2026-11-09. The Spec's refusal of RGB and non-RGB units in one description in Stages 1-2 (R_HETEROGENEOUS_LAYOUT_NOT_ENABLED, experiment-v1 4.4b and 8, fixture v29) is not lifted. This PR only changes which refusal the user meets.

What changes, in a described run only:

  • The folder check's mixed_dtypes and inconsistent_dimensions (and missing_axes, different_channel_counts, channel_names_differ, which the description replaces too) no longer compare an RGB unit with a fluorescence one.
    • Notebook folder check (unit_consistency.unit_checked): the checks run inside each unit, because image types are not declared yet.
    • Run and Check and save (check_description / declared_type_issues): pixel types are compared among units that declare the same image_type; the arrangement of dimensions stays with the axis review.
  • A mixed RGB + fluorescence experiment reaches the notebook screens and stops with R_HETEROGENEOUS_LAYOUT_NOT_ENABLED, explained in words on the check-and-save screen (existing text, now tested).
  • A unit mixed inside itself is still refused.
  • Undescribed (v0.4) runs, the CLI check and the non-described notebook are unchanged.

Refactor: the dtype and arrangement checks move from metadata.py to image_consistency.py unchanged (metadata.py 700 to 649 lines, baseline lowered).

Tests: tests/test_described_unit_checks.py (the existing P04 test is kept).


Generated by Claude Code

In a described run the folder check's mixed_dtypes and inconsistent_dimensions no longer
compare an RGB unit with a fluorescence unit: the notebook's folder check works inside each
unit and the run compares units of one declared image_type. A mixed experiment now stops at
R_HETEROGENEOUS_LAYOUT_NOT_ENABLED, which is not lifted. Undescribed runs are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
@guijacquemet
guijacquemet marked this pull request as ready for review November 9, 2026 07:01
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
A unit whose images disagree inside itself in arrangement or channel count is still
refused by the described folder check, and units of one layout that disagree with each
other in arrangement, channel count or axes are still refused by the run
(inconsistent_mapping, R_CHANNEL_COUNT_MISMATCH, missing_axes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Described runs: allow RGB and fluorescence units in one experiment

2 participants